package com.yanqu.road.entity.activity.xiaowuRecall;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

import java.util.Map;

@FieldTypeAnnotation(tableName = "t_u_activity_xiaowu_recall")
public class XiaowuRecallUserData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "玩家ID", select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "当前图片小块定位次数")
    private int[] sliceCondition = new int[15];

    @FieldTypeAnnotation(desc = "积分")
    private long score;

    @FieldTypeAnnotation(desc = "当前未抽到新块次数")
    private int commonTimes;

    @FieldTypeAnnotation(desc = "记忆之魂")
    private int soul;

    @FieldTypeAnnotation(desc = "页数")
    private int page;

    @FieldTypeAnnotation(desc = "是否领奖")             //0为未领奖,1为已领取
    private Map<Integer, Integer> awarded;

    @FieldTypeAnnotation(desc = "本轮消耗的道具")
    private int turnCost;

    @FieldTypeAnnotation(desc = "本轮获得的积分")
    private long turnScore;


    //不入库，加载进来的时候算
    private int process;


    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int[] getSliceCondition() {
        return sliceCondition;
    }

    public void setSliceCondition(int[] sliceCondition) {
        if (null == sliceCondition) {
            return;
        }
        if (this.sliceCondition == null || !this.sliceCondition.equals(sliceCondition)) {
            this.sliceCondition = sliceCondition;
            setOp(DataStatus.Update);
        }
    }

    public long getScore() {
        return score;
    }

    public void setScore(long score) {
        if (this.score != score) {
            this.score = score;
            setOp(DataStatus.Update);
        }
    }

    public int getCommonTimes() {
        return commonTimes;
    }

    public void setCommonTimes(int commonTimes) {
        if (this.commonTimes != commonTimes) {
            this.commonTimes = commonTimes;
            setOp(DataStatus.Update);
        }
    }

    public int getSoul() {
        return soul;
    }

    public void setSoul(int soul) {
        if (this.soul != soul) {
            this.soul = soul;
            setOp(DataStatus.Update);
        }
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        if (this.page != page) {
            this.page = page;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, java.lang.Integer> getAwarded() {
        return awarded;
    }

    public void setAwarded(java.util.Map<java.lang.Integer, java.lang.Integer> awarded) {
        if (null == awarded) {
            return;
        }
        this.awarded = awarded;
        setOp(DataStatus.Update);

    }

    public int getProcess() {
        return process;
    }

    public void setProcess(int process) {
        this.process = process;
    }

    public int getTurnCost() {
        return turnCost;
    }

    public void setTurnCost(int turnCost) {
        if (this.turnCost != turnCost){
            this.turnCost = turnCost;
            setOp(DataStatus.Update);
        }
    }

    public long getTurnScore() {
        return turnScore;
    }

    public void setTurnScore(long turnScore) {
        if (this.turnScore != turnScore){
            this.turnScore = turnScore;
            setOp(DataStatus.Update);
        }
    }
}
